package com.uzai.common.enums;

/**
 * 营销标签类型
 */
public enum MarketingTagTypeEnum {
    /**
     * 普通标签
     */
    NORMAL(0,"普通标签"),

    /**
     * 下单奖励（营销）
     */
    ORDER_REWARD(1,"下单奖励（营销）"),

    /**
     * 推广奖励（营销）
     */
    REG_REWARD(2,"邀请额外奖励（营销）"),

    /**
     * 定向比例
     */
    ORDER_PRI_RULE(3,"定向比例"),

    /**
     * 提现需审核
     */
    TAKETAL_NEED_EXAMINE(4,"提现需审核"),

    /**
     * 提现免审核
     */
    TAKETAL_NOT_EXAMINE(5,"提现免审核"),

    /**
     * 订单需冻结
     */
    ORDER_NEED_FREEZE(6,"订单需冻结"),

    /**
     * 订单免冻结
     */
    ORDER_NOT_FREEZE(7,"订单免冻结");



    public static final int NORMAL_VALUE = 0;
    public static final int ORDER_REWARD_VALUE = 1;
    public static final int REG_REWARD_VALUE = 2;
    public static final int ORDER_PRI_RULE_VALUE = 3;
    public static final int TAKETAL_NEED_EXAMINE_VALUE = 4;
    public static final int TAKETAL_NOT_EXAMINE_VALUE = 5;
    public static final int ORDER_NEED_FREEZE_VALUE = 6;
    public static final int ORDER_NOT_FREEZE_VALUE = 7;

    private Integer id;
    private String desc;
    MarketingTagTypeEnum(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }
    public Integer getId() {
        return id;
    }
    public String getDesc() {
        return desc;
    }
    public static MarketingTagTypeEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (MarketingTagTypeEnum type: MarketingTagTypeEnum.values()) {
            if (type.getId().intValue() == id) {
                return type;
            }
        }
        return null;
    }
}
